package com.geh.learn.stream;

public class GroupByListToMapList {

    // Map<String, List<Employee>> employeesByCity =  employees.stream().collect(groupingBy(Employee::getCity));

    // Map<String, Double> avgSalesByCity = employees.stream().collect(groupingBy(Employee::getCity, averagingInt(Employee::getNumSales)));

    // Map<Boolean, List<Employee>> partitioned = employees.stream().collect(partitioningBy(e -> e.getNumSales() > 150));

    // Map<Boolean, Map<String, Long>> result = employees.stream().collect(partitioningBy(e -> e.getNumSales() > 150, groupingBy(Employee::getCity, counting())));

}
